<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
    <head>
        <th:block th:include="include::header('安全检查发布')" />
    </head>
    <body class="febs-container" id="febs-hazardExamine">
    <style type="text/css">
        #febs-hazardExamine {

        }
    </style>
        <div class="febs-body layui-fluid"  lay-title="安全检查发布" >
            <div class="febs-body-search">
                <form class="layui-form layui-table-form" lay-filter="hazardExamine-table-form" id="hazardExamine-table-form">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form-item">
                                <div class="layui-inline" th:if="${hasHeadCompanyRole }">
                                    <label class="layui-form-label layui-form-label-sm">公司名称</label>
                                    <div class="layui-input-inline" style="width:240px;">
                                        <select name="tenantSelect" id="tenantSelect" lay-search="" >
                                            <option th:each="item:${tenantList }"
                                                    th:value="${item.tenantId}" th:text="${item.tenantName}"
                                                    th:selected="${currentTenantId ==item.tenantId}">
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查编号</label>
                                    <div class="layui-input-inline" >
                                        <input type="text" name="examineNo" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查标题</label>
                                    <div class="layui-input-inline" >
                                        <input type="text" name="examineTitle" autocomplete="off" class="layui-input">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查类型</label>
                                    <div class="layui-input-inline" style="width: 240px;">
                                        <select name="examineType" id="examineType" lay-search="" >
                                            <option value="">请选择</option>
                                            <option value="1">公司检查</option>
                                            <option value="2">部门检查</option>
                                            <option value="3">车间检查</option>
                                            <option value="4">班组检查</option>
                                            <option value="5">项目检查</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label layui-form-label-sm">检查状态</label>
                                    <div class="layui-input-inline" >
                                        <select name="status" id="status" lay-search="" >
                                            <option value="">请选择</option>
                                            <option value="1">待发布</option>
                                            <option value="2">待检查</option>
                                            <option value="3">进行中</option>
                                            <option value="4">已结束</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <div id="query" class="layui-btn">
                                        <em class="layui-icon">&#xe615;</em> 查询
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="febs-table-full">
                <table lay-filter="hazardExamineTable" id="hazardExamineTable'}" lay-data="{id: 'hazardExamineTable'}"></table>
            </div>
        </div>
        <th:block th:include="include::foot" />
        <script type="text/html" id="hazardExamine-toolbar">
            <div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="hazardExamine:add">
                <em class="layui-icon">&#xe654;</em> 新增
            </div>
        </script>
        <script type="text/html" id="hazardExamine-tool">
            <span shiro:lacksPermission="hazardExamine:edit,hazardExamine:delete">
                <span class="layui-badge-dot febs-bg-orange"></span> 无权限
             </span>
            {{# if(currentTenantId == d.tenantId){  }}
                {{# if(d.status=='1'){  }}
                    <button type="button" lay-event="edit" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange"
                            shiro:hasPermission="hazardExamine:edit">
                        <em class="layui-icon layui-icon-edit"></em>编辑
                    </button>
                    <button type="button" lay-event="del"  class="layui-btn layui-btn-xs  layui-btn-primary layui-border-red"
                            shiro:hasPermission="hazardExamine:delete">
                        <em class="layui-icon layui-icon-delete"></em>删除
                    </button>
                {{# } else { }}
                    - -
                {{# } }}
            {{# } else { }}
                - -
            {{# } }}
        </script>
        <script data-th-inline="javascript" >
            currentTenantId = [[${tenantId}]],
            hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
        </script>
        <script th:src="@{/febs/js/hazard/hazardExamine/hazardExamineList.js(v=1)}"></script>
    </body>
</html>